package com.ieng.ormosia.common.utils.context;

import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

import javax.servlet.http.HttpServletRequest;

public class ServletHolder {

    public static HttpServletRequest getRequest(){
        return requestAttributes().getRequest();
    }

    public static ServletRequestAttributes requestAttributes(){
        return (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
    }

}
